package com.support;

import org.springframework.core.convert.converter.Converter;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;

public enum LocalDateToStringConverter implements Converter<LocalDate,String> {
    INSTANCE;

    @Override
    public String convert(LocalDate source) {
        System.out.println("LocalDate to String---");
        return source.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
    }
}
